/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package cart.hibernate.order;

/**
 *
 * @author BibooChung
 */

import java.util.Date;
import java.util.Set;
import java.util.HashSet;
import cart.hibernate.paymentMethod.*;
import cart.hibernate.orderStatus.*;
import cart.hibernate.address.*;
import cart.hibernate.member.*;
import cart.hibernate.movieInformation.*;

public class Order {
    private long orderId;
    private Date orderDatetime;
    private Date shippedDatetime;
    private String pickupPersonName;
    private Date modifiedDatetime;
    private String creditCardNum;
    private double totalPrice;

    private PaymentMethod paymentMethod;
    private OrderStatus orderStatus;
    private Address address;
    private Member member;


    private Set<MovieInformation> movies = new HashSet<MovieInformation>();

    public Order(){
    }

    public Order(Date orderDatetime, Date shippedDatetime, String pickupPersonName,
                 String creditCardNum, double totalPrice, PaymentMethod paymentMethod, 
                 OrderStatus orderStatus, Address address, Member member, Set<MovieInformation> movies){
        this.orderDatetime = orderDatetime;
        this.shippedDatetime = shippedDatetime;
        this.pickupPersonName = pickupPersonName;
        this.creditCardNum = creditCardNum;
        this.totalPrice = totalPrice;
        this.paymentMethod = paymentMethod;
        this.orderStatus = orderStatus;
        this.address = address;
        this.member = member;
        this.movies = movies;
    }
    public Order(Date orderDatetime, Date shippedDatetime, String pickupPersonName,
                 String creditCardNum, double totalPrice, PaymentMethod paymentMethod, 
                 OrderStatus orderStatus, Address address, Member member){
        this.orderDatetime = orderDatetime;
        this.shippedDatetime = shippedDatetime;
        this.pickupPersonName = pickupPersonName;
        this.creditCardNum = creditCardNum;
        this.totalPrice = totalPrice;
        this.paymentMethod = paymentMethod;
        this.orderStatus = orderStatus;
        this.address = address;
        this.member = member;
    }
    public Order(Order order){
        this.orderDatetime = order.orderDatetime;
        this.shippedDatetime = order.shippedDatetime;
        this.pickupPersonName = order.pickupPersonName;
        this.creditCardNum = order.creditCardNum;
        this.totalPrice = order.totalPrice;
        this.paymentMethod = order.paymentMethod;
        this.orderStatus = order.orderStatus;
        this.address = order.address;
        this.member = order.member;
        this.movies = order.movies;
    }
/*
    public Order(Date orderDatetime, Date shippedDatetime, String pickupPersonName, Date modifiedDatetime,
                 String creditCardNum, double totalPrice, PaymentMethod paymentMethod, OrderStatus orderStatus, 
                 Address address, Member member){
        this.orderDatetime = orderDatetime;
        this.shippedDatetime = shippedDatetime;
        this.pickupPersonName = pickupPersonName;
        this.modifiedDatetime = modifiedDatetime;
        this.creditCardNum = creditCardNum;
        this.totalPrice = totalPrice;
        this.paymentMethod = paymentMethod;
        this.orderStatus = orderStatus;
        this.address = address;
        this.member = member;
    }
/*
    public Order(Date orderDatetime, Date shippedDatetime, String pickupPersonName, Date modifiedDatetime,
                 String creditCardNum, double totalPrice, PaymentMethod paymentMethod, OrderStatus orderStatus, 
                 Address address, Member member, Set<MovieInformation> movies){
    	this.orderDatetime = orderDatetime;
        this.shippedDatetime = shippedDatetime;
        this.pickupPersonName = pickupPersonName;
        this.modifiedDatetime = modifiedDatetime;
        this.creditCardNum = creditCardNum;
        this.totalPrice = totalPrice;
        this.paymentMethod = paymentMethod;
        this.orderStatus = orderStatus;
        this.address = address;
        this.member = member;
	    this.movies = movies;
    }*/
    /**
     * @return the orderId
     */
    public long getOrderId() {
        return orderId;
    }

    /**
     * @param orderId the orderId to set
     */
    public void setOrderId(long orderId) {
        this.orderId = orderId;
    }

    /**
     * @return the orderDatetime
     */
    public Date getOrderDatetime() {
        return orderDatetime;
    }

    /**
     * @param orderDatetime the orderDatetime to set
     */
    public void setOrderDatetime(Date orderDatetime) {
        this.orderDatetime = orderDatetime;
    }

    /**
     * @return the shippedDatetime
     */
    public Date getShippedDatetime() {
        return shippedDatetime;
    }

    /**
     * @param shippedDatetime the shippedDatetime to set
     */
    public void setShippedDatetime(Date shippedDatetime) {
        this.shippedDatetime = shippedDatetime;
    }


    /**
     * @return the pickupPersonName
     */
    public String getPickupPersonName() {
        return pickupPersonName;
    }

    /**
     * @param pickupPersonName the pickupPersonName to set
     */
    public void setPickupPersonName(String pickupPersonName) {
        this.pickupPersonName = pickupPersonName;
    }


    /**
     * @return the modifiedDatetime
     */
    public Date getModifiedDatetime() {
        return modifiedDatetime;
    }

    /**
     * @param modifiedDatetime the modifiedDatetime to set
     */
    public void setModifiedDatetime(Date modifiedDatetime) {
        this.modifiedDatetime = modifiedDatetime;
    }

    /**
     * @return the creditCardNum
     */
    public String getCreditCardNum() {
        return creditCardNum;
    }

    /**
     * @param creditCardNum the creditCardNum to set
     */
    public void setCreditCardNum(String creditCardNum) {
        this.creditCardNum = creditCardNum;
    }

    /**
     * @return the totalPrice
     */
    public double getTotalPrice() {
        return totalPrice;
    }

    /**
     * @param totalPrice the totalPrice to set
     */
    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    /**
     * @return the movies
     */
    public Set<MovieInformation> getMovies() {
        return movies;
    }

    /** 
     * @param movies the movies to set
     */
    public void setMovies(Set<MovieInformation> movies) {
        this.movies = movies;
    }

    /**
     * @return the paymentMethod
     */
    public PaymentMethod getPaymentMethod() {
        return paymentMethod;
    }

    /**
     * @param paymentMethod the paymentMethod to set
     */
    public void setPaymentMethod(PaymentMethod paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    /**
     * @return the orderStatus
     */
    public OrderStatus getOrderStatus() {
        return orderStatus;
    }

    /**
     * @param orderStatus the orderStatus to set
     */
    public void setOrderStatus(OrderStatus orderStatus) {
        this.orderStatus = orderStatus;
    }

    /**
     * @return the address
     */
    public Address getAddress() {
        return address;
    }

    /**
     * @param address the address to set
     */
    public void setAddress(Address address) {
        this.address = address;
    }

    /**
     * @return the member
     */
    public Member getMember() {
        return member;
    }

    /**
     * @param member the member to set
     */
    public void setMember(Member member) {
        this.member = member;
    }
    public void setOrder(Date orderDatetime, Date shippedDatetime, String pickupPersonName,
                         String creditCardNum, double totalPrice, PaymentMethod paymentMethod, 
                         OrderStatus orderStatus, Address address, Member member, Set<MovieInformation> movies){
        this.orderDatetime = orderDatetime;
        this.shippedDatetime = shippedDatetime;
        this.pickupPersonName = pickupPersonName;
        this.creditCardNum = creditCardNum;
        this.totalPrice = totalPrice;
        this.paymentMethod = paymentMethod;
        this.orderStatus = orderStatus;
        this.address = address;
        this.member = member;
        this.movies = movies;
    }
    public void setOrder(Date orderDatetime, Date shippedDatetime, String pickupPersonName,
                         String creditCardNum, double totalPrice, PaymentMethod paymentMethod, 
                         OrderStatus orderStatus, Address address, Member member){
        this.orderDatetime = orderDatetime;
        this.shippedDatetime = shippedDatetime;
        this.pickupPersonName = pickupPersonName;
        this.creditCardNum = creditCardNum;
        this.totalPrice = totalPrice;
        this.paymentMethod = paymentMethod;
        this.orderStatus = orderStatus;
        this.address = address;
        this.member = member;
    }
}
